knitr::opts_chunk$set(
  echo = F,
  message = F,
  warning = F,
  collapse = T
)
library(here)
## here() starts at /Users/nmedina/Documents/u/0/art/res/GitHub/osa
#.GlobalEnv::
source(
  here("analysis/statsTbl.R")
)
## Registered S3 methods overwritten by 'readr':
##   method                    from 
##   as.data.frame.spec_tbl_df vroom
##   as_tibble.spec_tbl_df     vroom
##   format.col_spec           vroom
##   print.col_spec            vroom
##   print.collector           vroom
##   print.date_names          vroom
##   print.locale              vroom
##   str.col_spec              vroom
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
## ✓ tibble  3.1.4     ✓ dplyr   1.0.7
## ✓ tidyr   1.1.3     ✓ stringr 1.4.0
## ✓ readr   2.0.1     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x readr::col_character()  masks vroom::col_character()
## x readr::col_date()       masks vroom::col_date()
## x readr::col_datetime()   masks vroom::col_datetime()
## x readr::col_double()     masks vroom::col_double()
## x readr::col_factor()     masks vroom::col_factor()
## x readr::col_guess()      masks vroom::col_guess()
## x readr::col_integer()    masks vroom::col_integer()
## x readr::col_logical()    masks vroom::col_logical()
## x readr::col_number()     masks vroom::col_number()
## x readr::col_skip()       masks vroom::col_skip()
## x readr::col_time()       masks vroom::col_time()
## x readr::cols()           masks vroom::cols()
## x readr::default_locale() masks vroom::default_locale()
## x dplyr::filter()         masks stats::filter()
## x readr::fwf_cols()       masks vroom::fwf_cols()
## x readr::fwf_empty()      masks vroom::fwf_empty()
## x readr::fwf_positions()  masks vroom::fwf_positions()
## x readr::fwf_widths()     masks vroom::fwf_widths()
## x dplyr::lag()            masks stats::lag()
## x readr::locale()         masks vroom::locale()
## x readr::output_column()  masks vroom::output_column()
## x readr::problems()       masks vroom::problems()
## Using user data cache /Users/nmedina/Library/Application Support/R/BIOMASS
##   To clear or remove cache see function clearCache().
## Rows: 1243 Columns: 17
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): fam, gen, sp
## dbl (14): ID, dist, plot, rep, N, W, incl, side, spg, dap, h, b, kg, luz
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## Cache last modification time : 2021-01-06 15:19:51
## Source cache:1242
## Corrections FALSE:936, TaxaNotFound:212, TRUE:7, SpNotFound:87
## The reference dataset contains 16467 wood density values
## Your taxonomic table contains 49 taxa
## 
## Attaching package: 'rstatix'
## The following object is masked from 'package:stats':
## 
##     filter
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.5-7
## Adding missing grouping variables: `dist`, `plot`

## Adding missing grouping variables: `dist`, `plot`, `fam`, `gen`, `sp`
## Registered S3 method overwritten by 'parsnip':
##   method          from 
##   print.nullmodel vegan
## Registered S3 method overwritten by 'tune':
##   method                   from   
##   required_pkgs.model_spec parsnip
## ── Attaching packages ────────────────────────────────────── tidymodels 0.1.3 ──
## ✓ broom        0.7.9      ✓ rsample      0.1.0 
## ✓ dials        0.0.9      ✓ tune         0.1.6 
## ✓ infer        1.0.0      ✓ workflows    0.2.3 
## ✓ modeldata    0.1.1      ✓ workflowsets 0.1.0 
## ✓ parsnip      0.1.7      ✓ yardstick    0.0.8 
## ✓ recipes      0.1.16
## ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
## x recipes::check()     masks permute::check()
## x infer::chisq_test()  masks rstatix::chisq_test()
## x scales::discard()    masks purrr::discard()
## x rstatix::filter()    masks dplyr::filter(), stats::filter()
## x recipes::fixed()     masks stringr::fixed()
## x dials::get_n()       masks rstatix::get_n()
## x dplyr::lag()         masks stats::lag()
## x parsnip::nullmodel() masks vegan::nullmodel()
## x infer::prop_test()   masks rstatix::prop_test()
## x yardstick::spec()    masks readr::spec(), vroom::spec()
## x recipes::step()      masks stats::step()
## x infer::t_test()      masks rstatix::t_test()
## • Use tidymodels_prefer() to resolve common conflicts.
## Loading required package: ggpp
## 
## Attaching package: 'ggpp'
## The following object is masked from 'package:ggplot2':
## 
##     annotate

Results

Shade, biomass, diversity

## [[1]]

## 
## [[2]]

  • spg et al. vars at tree or plot level? i think plot level.

  • richness, entropy [+spg] signif

  • but why reverse relationships from each other?

  • check curve below

## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]

## 
## [[6]]

  • higher medians below
## [[1]]

  • check curve below
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

  • spg appears signif–explanation will be relevant
  • explore historgrams for non-sig vars? (i.e. non-equilibrium stats)

Composition

## 
## Call:
## adonis(formula = ordModel, data = metaTbl, permutations = 99999) 
## 
## Permutation: free
## Number of permutations: 99999
## 
## Terms added sequentially (first to last)
## 
##           Df SumsOfSqs MeanSqs F.Model      R2  Pr(>F)   
## dist       1    0.6074 0.60742  3.6008 0.11395 0.00214 **
## Residuals 28    4.7234 0.16869         0.88605           
## Total     29    5.3308                 1.00000           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

  • which species cause this diff?
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

  • check curve below
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

  • higher medians below
## [[1]]

  • check curve below
## [[1]]

## 
## [[2]]

Discussion

Appendix + some dependencies